<template>
  <div class="app-container">
    <PlatformHeader />
    <div style="padding: 0 10px;height: 100vh">
      <el-form class="custom-form" :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" style="margin-top: 30px;">
        <el-form-item prop="deptName">
          <el-input
            v-model="queryParams.deptName"
            placeholder="机构名称："
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item prop="status" style="margin-left: 12px;">
          <el-select v-model="queryParams.status" placeholder="机构状态：" clearable popper-class="custom-select-dropdown">
            <el-option
              v-for="dict in dict.type.sys_normal_disable"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" class="search-btn action-btn">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" class="reset-btn action-btn">重置</el-button>
          <el-button
            type="primary"
            plain
            icon="el-icon-plus"
            size="mini"
            @click="handleAdd"
            v-hasPermi="['system:dept:add']"
            class="action-btn add-btn"
          >新增</el-button>
          <el-button
            type="info"
            plain
            icon="el-icon-sort"
            size="mini"
            @click="toggleExpandAll"
            class="action-btn export-btn"
          >展开/折叠</el-button>
        </el-form-item>
        <!--      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
      </el-form>

      <el-table
        v-if="refreshTable"
        v-loading="loading"
        :data="deptList"
        row-key="deptId"
        :default-expand-all="isExpandAll"
        :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
        height="1000"
      >
        <el-table-column prop="deptName" label="机构名称" align="center" width="300"></el-table-column>
        <el-table-column prop="organizationcode" label="机构代码" align="center" width="300"></el-table-column>
        <el-table-column prop="orderNum" label="排序" align="center" width="160"></el-table-column>
        <el-table-column prop="type" label="机构属性" align="center" width="200">
          <template slot-scope="scope">
            <span>{{ scope.row.type === '0' ? '行政' : '监测点' }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="status" label="状态" align="center" width="200">
          <template slot-scope="scope">
            <span>{{ scope.row.status === '0' ? '正常' : '停用' }}</span>
          </template>
        </el-table-column>
        <el-table-column label="创建时间" align="center" prop="createTime" width="300">
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.createTime) }}</span>
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['system:dept:edit']"
            >修改</el-button>
            <el-button
              size="mini"
              type="text"
              icon="el-icon-plus"
              @click="handleAdd(scope.row)"
              v-hasPermi="['system:dept:add']"
              style="margin-left: 15px;"
            >新增</el-button>
            <el-button
              v-if="scope.row.parentId != 0"
              size="mini"
              type="text"
              icon="el-icon-delete"
              @click="handleDelete(scope.row)"
              v-hasPermi="['system:dept:remove']"
              style="margin-left: 15px;"
            >删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>



    <el-dialog
      :title="title"
      :visible.sync="open"
      width="680px"
      custom-class="custom-dialog"
      :close-on-click-modal="false"
      v-dialog-drag
      append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
        <el-row>
          <el-col :span="24" v-if="form.parentId !== 0">
            <el-form-item label="上级机构" prop="parentId">
              <treeselect
                v-model="form.parentId"
                :options="deptOptions"
                :normalizer="normalizer"
                placeholder="选择上级部门"
                class="custom-treeselect" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="机构名称" prop="deptName">
              <el-input v-model="form.deptName" placeholder="请输入机构名称" class="custom-input" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="机构代码" prop="">
              <el-input v-model="form.organizationcode" placeholder="请输入机构代码" maxlength="80" class="custom-input" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="显示排序" prop="orderNum">
              <el-input-number
                v-model="form.orderNum"
                controls-position="right"
                :min="0"
                class="custom-input-number" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="机构状态">
              <el-radio-group v-model="form.status" class="custom-radio-group">
                <el-radio
                  v-for="dict in dict.type.sys_normal_disable"
                  :key="dict.value"
                  :label="dict.value"
                  class="custom-radio"
                >{{dict.label}}</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="机构属性">
              <el-radio-group v-model="form.type" class="custom-radio-group">
                <el-radio
                  v-for="dict in dict.type.org_attribute_control"
                  :key="dict.value"
                  :label="dict.value"
                  class="custom-radio"
                >{{dict.label}}</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="12" v-if="form.type === '1'">
            <el-form-item label="设备号" prop="equipmentid">
              <el-input
                v-model="form.equipmentid"
                placeholder="请输入设备号"
                maxlength="80"
                class="custom-input"
              />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel" class="dialog-cancel-btn">取 消</el-button>
        <el-button type="primary" @click="submitForm" class="dialog-confirm-btn">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import PlatformHeader from '../../../components/PlatformHeader/index.vue';
export default {
  name: "Dept",
  dicts: ['sys_normal_disable','org_attribute_control'],
  components: { Treeselect, PlatformHeader },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 显示搜索条件
      showSearch: true,
      // 表格树数据
      deptList: [],
      // 部门 机构 树选项
      deptOptions: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 是否展开，默认全部展开
      isExpandAll: true,
      // 重新渲染表格状态
      refreshTable: true,
      // 查询参数
      queryParams: {
        deptName: undefined,
        status: undefined
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        parentId: [
          { required: true, message: "上级机构不能为空", trigger: "blur" }
        ],
        deptName: [
          { required: true, message: "机构名称不能为空", trigger: "blur" }
        ],
        orderNum: [
          { required: true, message: "显示排序不能为空", trigger: "blur" }
        ],
        email: [
          {
            type: "email",
            message: "请输入正确的邮箱地址",
            trigger: ["blur", "change"]
          }
        ],
        phone: [
          {
            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
            message: "请输入正确的手机号码",
            trigger: "blur"
          }
        ]
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询部门 机构列表 */
    getList() {
      this.loading = true;
      listDept(this.queryParams).then(response => {
        this.deptList = this.handleTree(response.data, "deptId");
        this.loading = false;
      });
    },
    /** 转换部门 机构数据结构 */
    normalizer(node) {
      if (node.children && !node.children.length) {
        delete node.children;
      }
      return {
        id: node.deptId,
        label: node.deptName,
        children: node.children
      };
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        deptId: undefined,
        parentId: undefined,
        deptName: undefined,
        orderNum: undefined,
        leader: undefined,
        phone: undefined,
        email: undefined,
        organizationcode: undefined,
        equipmentid: undefined,
        status: "0",
        type: "0"
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    /** 新增按钮操作 */
    handleAdd(row) {
      this.reset();
      if (row != undefined) {
        this.form.parentId = row.deptId;
      }
      this.open = true;
      this.title = "添加机构";
      listDept().then(response => {
        this.deptOptions = this.handleTree(response.data, "deptId");
      });
    },
    /** 展开/折叠操作 */
    toggleExpandAll() {
      this.refreshTable = false;
      this.isExpandAll = !this.isExpandAll;
      this.$nextTick(() => {
        this.refreshTable = true;
      });
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      getDept(row.deptId).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改机构";
      });
      listDeptExcludeChild(row.deptId).then(response => {
        this.deptOptions = this.handleTree(response.data, "deptId");
      });
    },
    /** 提交按钮 */
    submitForm: function() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.deptId != undefined) {
            console.log(this.form)
            updateDept(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addDept(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      this.$modal.confirm('是否确认删除名称为"' + row.deptName + '"的数据项？').then(function() {
        return delDept(row.deptId);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    }
  }
};
</script>
<style scoped lang="scss">
.app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: url('../../assets/images/bgn.png');
  background-size: 100% 100%;
  padding: 16px;
  box-sizing: border-box;
  padding-top: 0;
}
::v-deep .el-switch.is-checked .el-switch__core{
  border-color: #0160FA;
  background-color: #0160FA;
}

/* 表格整体容器 */
::v-deep .el-table {
  background: transparent;
  border-radius: 12px;
  overflow: hidden;

  /* 表头圆角 */
  .el-table__header-wrapper {
    border-radius: 12px;
    overflow: hidden;

    th:first-child {
      border-top-left-radius: 12px;
    }
    th:last-child {
      border-top-right-radius: 12px;
    }
  }
  /* 表格行圆角 */
  .el-table__body-wrapper {
    border-radius: 0 0 12px 12px;

    tr {
      td:first-child {
        border-bottom-left-radius: 12px;
      }
      td:last-child {
        border-bottom-right-radius: 12px;
      }
    }

    /* 为每一行添加圆角 */
    tr.el-table__row {
      td:first-child {
        border-top-left-radius: 12px;
        border-bottom-left-radius: 12px;
      }
      td:last-child {
        border-top-right-radius: 12px;
        border-bottom-right-radius: 12px;
      }
    }
  }
}
/* 确保表头单元格没有边框干扰圆角 */
::v-deep .el-table th.el-table__cell {
  border: none;
}
.el-table::before{
  height: 0;
}
::v-deep .el-table th.el-table__cell.is-leaf{
  border-bottom: none;
}
/* 表头 - 深蓝到青绿，柔和渐变 */
::v-deep .el-table th {
  background: #f7e797;
  color: #1e4f91; // 更深的蓝
  font-weight: bold;
  font-size: 18px;
  height: 30px;
  line-height: 30px;
}
/* 奇偶行 - 亮蓝与浅青 */
::v-deep .el-table__row {
  td {
    border: none; /* 移除单元格边框 */
  }
}

/* 奇偶行 - 亮蓝与浅青 */
::v-deep .el-table__row:nth-child(odd) {
  background: linear-gradient(90deg, #99e8ff, #4f85ff);
}
::v-deep .el-table__row:nth-child(even) {
  background: linear-gradient(90deg, #4f85ff, #99e8ff);
}

/* 单元格文字 */
::v-deep .el-table td {
  color: #000; /* 深灰色，更易读 */
  font-size: 18px;
  padding: 12px 8px;
}
::v-deep .el-table__body {
  border-collapse: separate !important;
  border-spacing: 0 5px !important;
}
/* 鼠标悬停 - 橙黄渐变 */
::v-deep .el-table__body tr:hover > td {
  background: #9ef7c5!important;
  // transition: background 0.25s ease;
}

/* 操作栏按钮文字颜色 - 黑色 */
::v-deep .el-table .el-button--mini {
  color: #000 !important; /* 文字颜色改为纯黑 */
  font-size: 18px;
  font-weight: 400;
}
::v-deep .el-table .cell{
  line-height: 35px;
  height: 35px;
}
/* 表格整体 */

/* 分页栏美化 */
::v-deep .pagination {
  margin-top: 16px;
  padding: 10px 0;
  background-color: #f8fbff;
  border-radius: 8px;
}
::v-deep .pagination-container{
  background: transparent;
}
::v-deep .el-pagination{
  color: #fff!important;
}
::v-deep .el-pagination__total{
  color: #fff!important;
}
::v-deep .el-pagination__jump{
  color: #fff!important;
}

/* 美化 el-input 输入框 */
::v-deep .el-input .el-input__inner {
  background-color: rgba(255, 255, 255, 0.1); /* 半透明白背景 */
  border: 1px solid #00CCFE; /* 柔和的蓝色边框 */
  border-radius: 6px;
  color: #f0f0f0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  font-size: 16px;
}

/* 输入框 placeholder 颜色改为 #fff */
::v-deep .el-input__inner::placeholder {
  color: #fff !important;
}

/* 输入框获得焦点时边框高亮 */
::v-deep .el-input .el-input__inner:focus {
  border-color: #409eff; /* element-ui 默认蓝色 */
  box-shadow: 0 0 5px rgba(64, 158, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* 清除按钮的颜色调整 */
::v-deep .el-input__clear {
  color: #a8c0ff;
}

/* 清除按钮 hover 颜色 */
::v-deep .el-input__clear:hover {
  color: #409eff;
}

/* 搜索区按钮美化 - 调大尺寸 */
::v-deep .el-form-item .el-button {
  border-radius: 22px;
  font-weight: 600;
  font-size: 16px;       /* 字号变大 */
  padding: 10px 28px;    /* 内边距加大 */
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(66, 133, 244, 0.3);
}

/* 通用按钮基础样式 */
.el-button {
  font-size: 14px;
  padding: 10px 20px; /* 比默认稍大 */
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.25s ease;
}

/* 美化日期选择框 */
::v-deep .el-date-editor {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid #00CCFE !important;
  border-radius: 6px;
  color: #f0f0f0 !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

::v-deep .el-date-editor:hover {
  border-color: #409eff !important;
}

::v-deep .el-date-editor .el-range-input {
  background-color: transparent !important;
  color: #fff !important;
}

::v-deep .el-date-editor .el-range-separator {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* 日期选择框 placeholder 颜色改为白色 */
::v-deep .el-date-editor .el-range-input::placeholder {
  color: #fff !important;
}

/* 单个日期选择框（非范围） placeholder 颜色 */
::v-deep .el-date-editor input::placeholder {
  color: #fff !important;
}

/* 统一弹窗里的 el-input、el-select 样式 */
::v-deep .el-dialog .el-input__inner,
::v-deep .el-dialog .el-select .el-input__inner {
  color: #000 !important;
  border: 1px solid rgba(79, 133, 255, 0.3);
}

::v-deep .el-dialog .el-input__inner:focus {
  border-color: #409eff !important;
  box-shadow: 0 0 5px rgba(64, 158, 255, 0.6) !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
}
/* 调整表单里的按钮间距 */
::v-deep .el-form-item .el-button {
  margin-left: 12px; /* 你可以改成 16px 更宽松 */
}
/* 按钮通用样式（不改尺寸） */
::v-deep .el-form-item .action-btn {
  border-radius: 20px; /* 圆润 */
  font-weight: 600;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* 悬浮时按钮微微上浮 + 光晕 */
::v-deep .el-form-item .action-btn:hover {
  transform: translateY(-2px);
}

/* 搜索按钮 - 宝石蓝渐变 */
::v-deep .el-form-item .search-btn {
  background: linear-gradient(135deg, #b4cdeb, #2f6bcc);
  color: #fff;
}
::v-deep .el-form-item .search-btn:hover {
  background: linear-gradient(135deg, #5aa2f8, #3a8ef6);
  box-shadow: 0 6px 14px rgba(58, 142, 246, 0.5);
}

/* 重置按钮 - 高级灰蓝 */
::v-deep .el-form-item .reset-btn {
  background: linear-gradient(135deg, #df9f3f, #edc73d);
  color: #fff;
}
::v-deep .el-form-item .reset-btn:hover {
  background: linear-gradient(135deg, #ffcc80, #ffb74d);
  box-shadow: 0 6px 14px rgba(255, 183, 77, 0.5);
}

/* 新增按钮 - 蓝绿色渐变 */
::v-deep .el-form-item .add-btn {
  background: linear-gradient(135deg, #4fd1c5, #38b2ac);
  color: #fff;
}
::v-deep .el-form-item .add-btn:hover {
  background: linear-gradient(135deg, #6ee7df, #4fd1c5);
  box-shadow: 0 6px 14px rgba(72, 187, 176, 0.5);
}

/* 修改按钮 - 青柠绿渐变 */
::v-deep .el-form-item .edit-btn {
  background: linear-gradient(135deg, #8bc34a, #6fa33f);
  color: #fff;
}
::v-deep .el-form-item .edit-btn:hover {
  background: linear-gradient(135deg, #a8d672, #8bc34a);
  box-shadow: 0 6px 14px rgba(139, 195, 74, 0.5);
}

/* 删除按钮 - 胭脂红渐变 */
::v-deep .el-form-item .delete-btn {
  background: linear-gradient(135deg, #e57373, #c62828);
  color: #fff;
}
::v-deep .el-form-item .delete-btn:hover {
  background: linear-gradient(135deg, #ef9a9a, #e57373);
  box-shadow: 0 6px 14px rgba(229, 115, 115, 0.5);
}

/* 导出按钮 - 金橙渐变 */
::v-deep .el-form-item .export-btn {
  background: linear-gradient(135deg, #1ec2e7, #54a9ff);
  color: #fff;
}
::v-deep .el-form-item .export-btn:hover {
  background: linear-gradient(135deg, #7cdde7, #2989e9);
  box-shadow: 0 6px 14px rgba(160, 180, 200, 0.5);
}
::v-deep ::-webkit-scrollbar {
  width: 2px;
  height: 6px;
}
/* 对话框整体样式 - 添加渐变背景 */
::v-deep .custom-dialog {
  border-radius: 16px !important;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  background: linear-gradient(145deg, #f5f7fa, #e4e8f0);

  .el-dialog__header {
    background: linear-gradient(90deg, #8caefb, #0160FA);
    padding: 20px;
    margin: 0;
    border-bottom: none;

    .el-dialog__title {
      color: #fff;
      font-size: 20px;
      font-weight: 600;
      letter-spacing: 1px;
    }

    .el-dialog__headerbtn {
      top: 20px;
      right: 20px;

      .el-dialog__close {
        color: #fff;
        font-size: 20px;
      }
    }
  }

  /* 修改body部分为渐变 */
  .el-dialog__body {
    padding: 45px 40px 10px 40px;
    background: linear-gradient(145deg, #e6f0ff, #bad2ff);
    color: #333; /* 文字颜色调整 */
  }

  /* 修改footer部分为渐变 - 与body同色系但略深 */
  .el-dialog__footer {
    padding: 20px 40px;
    background: linear-gradient(145deg, #e6f0ff, #a2c3ff);
    border-top: 1px solid rgba(79, 133, 255, 0.1); /* 半透明分割线 */
    border-radius: 0 0 16px 16px;
  }
}

/* 表单元素样式调整以适应新背景 */
::v-deep .custom-input {
  .el-input__inner {
    background-color: rgba(255, 255, 255, 0.1); /* 半透明白底 */
    border: 1px solid rgba(79, 133, 255, 0.3);
    color: #000;

    &:focus {
      border-color: #4f85ff;
      background-color: #fff;
      box-shadow: 0 0 0 2px rgba(79, 133, 255, 0.2);
    }
  }
}
::v-deep .custom-input.el-input .el-input__inner{
  border: 1px solid rgba(79, 133, 255, 0.3);
}
::v-deep .vue-treeselect:not(.vue-treeselect--disabled):not(.vue-treeselect--focused) .vue-treeselect__control:hover{
  border: 1px solid rgba(79, 133, 255, 0.3);
}
/* 单选按钮组样式调整 */
::v-deep .custom-radio-group {
  .custom-radio {
    .el-radio__label {
      color: #555; /* 加深文字颜色 */
    }
  }
}

/* 按钮样式微调以匹配新背景 */
/* 对话框底部按钮居中样式 */
.dialog-footer {
  display: flex;
  justify-content: center; /* 改为居中 */
  align-items: center;
  gap: 20px; /* 添加按钮间距 */

  .el-button {
    min-width: 120px; /* 稍微加大按钮宽度 */
    height: 40px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s;
    margin: 0; /* 移除原来的margin-left */
  }

  .dialog-cancel-btn {
    border: none;
    background: linear-gradient(135deg, #aed7ff, #80bcf9);
    color: #fff;
    font-size: 16px;
    box-shadow: 0 6px 14px rgb(128 188 249 / 50%);
    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
  }

  .dialog-confirm-btn {
    background: linear-gradient(90deg, #4f85ff, #6a8cff);
    border: none;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 6px 14px rgb(128 188 249 / 50%);
    &:hover {
      background: linear-gradient(90deg, #3a73ff, #4f85ff);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(79, 133, 255, 0.3);
    }

    &:active {
      transform: translateY(0);
    }
  }
}
::v-deep .custom-dialog .el-input__inner::placeholder {
  color: #555 !important;
  font-size: 14px;
}
::v-deep .custom-dialog .vue-treeselect__control{
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(79, 133, 255, 0.3);
}
::v-deep .vue-treeselect__placeholder{
  color: #555;
}
/* 响应式调整 */
@media (max-width: 768px) {
  ::v-deep .custom-dialog {
    width: 90% !important;

    .el-dialog__body {
      padding: 20px;
    }

    .el-form-item {
      margin-bottom: 18px;
    }

    .el-col {
      width: 100%;
    }
  }
}
/* 关键样式：调整输入框高度为36px */
::v-deep .custom-form .el-input__inner {
  height: 36px!important;
  line-height: 36px!important;
}
</style>
